var xmlHttp;

function createXMLHttp() {
	if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	} else {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
}

function main() {
	createXMLHttp();
	xmlHttp.onreadystatechange = CallbackFunction;
	xmlHttp.open("post", "user!login", true);
	xmlHttp.send(null);
}

function CallbackFunction() {
	if (xmlHttp.readyState == 4) {
		alert(document.getElementById("showUnDone").checked);
		if (xmlHttp.status == 200)
			location.href = "user!viewHomework?userNum="
					+ document.getElementById("user_id").value + "&showUnDone="
					+ document.getElementById("showUnDone").checked
					+ "&showDone="
					+ document.getElementById("showDone").checked;
	}
}